The below listing of codes are used when scripting Action Points. There are many codes, many with a number of options. This allows you to create unique events in an infinite number of possibilities. If you put the correct codes in sequence there is very little you can't do.
Code 60 Drop Party Money
ID Extra Codes ID
Use: This will allow you to take wealth from party members. This will drop all of the spcified type of wealth. Example: If you specify Gems and ALL, it will drop all Gems from all party members. If you specify Gold and Picked, it will drop all Gold from all currently Picked (See code 14) characters.
Options: None
E-Codes: 1) Type To Take 1 = Gold, 2 = Gem, 3 = Jewelry
2) Take from: 0 = ALL, 1 = Picked
 
Code 61 Shift Party X: and Y: Location
ID Extra Codes ID
Use: Use this code to shift the party in the X or Y directions. You can use this to move them a set distance or random amounts.
Options: None
E-Codes: 1) Not Used
2) Shift X Amount +/- Number of Steps
3) Shift Y Amount +/- Number of Steps
4) 0 = Move Exact Distance, 1 = Random amount from 1 to Values
 
Code 62 Display Scrolling Text
ID Text ID To Display
Use: To display a scrolling text message similar to what you see when you select "About Realmz" under the Apple Menu when Realmz is running.
Options: None
E-Codes: None
Text ID: To add this text to your scenario files you need to use a resource editor such as ResEdit. Create a resource of type "TEXT" with an ID from -200 to -300. Then enter that TEXT ID in this field and it will display a scrolling text of your TEXT instead of a map. You can open the file "Scenario" inside the Tutorial Scenario folder to see an example of this resource. To use styled text you can edit it and simply paste the TEXT into the resource file. All style formatting should be kept. Then just edit the TEXT ID and the STYLE ID to a value from -200 to -300.
 
Code 63 Alter Game Time
ID Extra Codes ID
Use: Use this code to change the current game time.
Options: None
E-Codes: 1) 1 = Set Absolute Time, 2 = Offset Game Time
2) Days (-1 = Do not alter from current days)
3) Hours (-1 = Do not alter from current hours)
4) Minutes (-1 = Do not alter from current minutes)
E-Code 1 Notes:
Set Absolute Time will just change the current game time to the Days, Hours and Minutes specified. No checks for time encounters or any other events will take place. If you enter a -1 in any field that value will stay the same as it was when you activated this code.
Offset Game Time will add the Days, Hours and Minutes to the current game time. Negative values will be subtracted from the game time so it is possible to go back in time. No checks for time encounters or any other events will take place.
 
Code 64 Branch on Game Time
Use: Lets you branch on a test on game time.
Options: None
E-Codes: 1) Test Time: Day (-1 = Skips Test For Day)
2) Test Time: Hour (-1 = Skips Test For Hour)
3) Test Time: Minute (-1 = Skips Test For Minute)
4) X-AP To Branch To If Before or Equal To Test Time.
5) X-AP To Branch To If After Test Time.
Note: a -1 in any field to skip the test on that portion.
Example: a -1 in the Day field will only branch on the outcome of the HOUR and MINUTE test.
 
Code 65 Award Random Item(s)
Use: Lets award the party a random item from a range of items.
Options: None
E-Codes: 1) Number of Items to Award: X items
Negative X Value = Random Number from 1 to X
2) Low ID of Random Items
3) High ID of Random Items
 
Code 66 Set Camping Ability
ID 0 = Allow Camping 1 = Disable Camping
Use: If you want to keep the party from camping, you can set the "Allow Camping Flag" to 1. If you want to enable camping again, set it to 0.
Options: None
E-Codes: None
 
Code 67 Branch on Item Charges
ID Extra Codes ID
Use: Lets you test to see if the party has an item with X number of charges. This will check and add up all charges from all like items.
Options: None
E-Codes: 1) Item ID To Check For
2) If Enough Charges, Branch To: 0 = X-AP, 1 = Simple,
2 = Complex
3) Number Of Charges Needed To Meet Requirement
4) X-AP/Encounter No. if charge requirement met.
-1 = Continue Current Script Instead of Branching.
5) X-AP/Encounter No. if charge requirement NOT met.
-1 = Continue Current Script Instead of Branching.
 
Code 68 Alter Party Fatigue
ID Extra Codes ID
Use: Lets you adjust the fatigue level of the party.
Options: None
E-Codes: 1) 1 = Set Fatigue to 100%, 2 = Set Fatigue to 0%,
3 = Calculate New Fatigue
2) Calculated Fatigue Value:
New Fatigue = Current Fatigue x 1-100%
 
Code 69 Set Spell Casting / Recharging Flags
ID Extra Codes ID
Use: Lets you turn the ability of characters or monsters/NPCs to cast spells from memory on or off. It also lets you turn spell point recharging over time on or off.
Options: None
E-Codes: 1) 0 = Turn Character Spell Casting ON,
1 = Turn Character Spell Casting Off
2) 0 = Turn Monster & NPC Spell Casting ON,
1 = Turn Monster & NPC Spell Casting Off
3) 0 = Turn Spell Point Recharging ON,
1 = Turn Spell Point Recharging Off
4) Not Used
5) ALWAYS set this field to a value of 1 (ONE)
 
Code 70 Save and Restory Party Postion
ID Extra Codes ID
Use: Lets you save the current location of the party. Later you can recall that postion and send the party to that exact same spot.
Options: None
E-Codes: 1) 1 = Save Current Postion.
2 = Send Party To Last Saved Position.
 
Code 71 Disable • Enable X: Y: Display
ID 0 = Turn X: Y: Display On. 1 = Turn X: Y: Display Off.
Use: Lets you turn the X: Y: Display to the left of the fatigue bar on or off. If it is OFF it will display ? instead of a value.
Options: None
E-Codes: None
 
Code 72 Branch on Range of Quests
ID Extra Codes ID
Use: Lets you check a whole range of quests and branch if they are all set to TRUE.
Options: None
E-Codes: 1) Low Quest ID Range to Check
2) High Quest ID Range to Check
3) REMARK: This will branch as dictated by #4 if all quests are set.
Else script continues.
4) Branch To: 0= X-AP, 1= Simple Ecounter,
2= Complex Encounter
5) X-AP ID / Ecounter ID To Branch To
 
Code 73 Load Shop & Restrict Items Accepted
ID Extra Codes ID
Use: Lets you load a shop as CODE #6 but also place some restrictions as to the range of items the shop keeper will buy or sell.
Options: None
E-Codes: 1) Shop ID (-ID = Go Directly To Shop)
2) Low Items ID To Accept #1
3) High Items ID To Accept #1
4) Low Items ID To Accept #2
5) High Items ID To Accept #2
Example: If you wanted shop ID 12 to only deal with Armor and items 905 through 910 you would fill it out like such.
#1: 12
#2: 200 (Standard armor items are from Item ID 200 - 400)
#3: 400
#4: 905
#5: 910
 
Code 74 Take • Give Spell Points To Picked Characters
ID Extra Codes ID
Use: Lets you take away or give spell points to picked characters. You need to use other codes such as Code 14 or Code 30 to pick the characters affected.
Options: None
E-Codes: 1) Multiplyer: Formula = Multiplyer x Random(Range)
2) Low Range Of Spell Points To Take • Give
3) High Range Of Spell Points To Take • Give
Note: Only characters capable of actually casting spells will recieve spell points and they can't get more than the maximum they would normaly have when fully rested.
Example:
#1: -10 (Multiplyer)
#2: 1 (Minimum amount per multiplyer)
#3: 6 (Maximum amount per multiplyer)
The amount calculated will be TAKEN as the multiplyer is a negative.
Amount taken will be -10 x (Random Amount from 1 to 6) for a minimum taken of 10 and a maximum taken of 60.
I use the multiplyer to simulate rolls in paper games such as 10d6 as demonstrated here.
 
Code 75 Branch on Spell Points
ID Extra Codes ID
Use: Lets you test characters for a specific number of spell points and branch depending on the outcome of the test.
Options: None
E-Codes: 1) Who To Test: 1 = Picked Characters, 2 = All Alive Characters
2) Amount 0f Spell Points Required For Branch:
3) 0 = Continue Script On Fail, 1 = Exit & Save Codes 0n Fail
4) On Success Branch To: 0 = X-AP, 1 = Simple Encounter,
2 = Complex Encounter
5) X-AP / Encounter ID
Note: Alive Characters are those that are above 0 stamina and are not animated.
 
Code 77 - 80 Not Used
 
Code 81 Branch on Character Condition
ID Extra Codes ID
Use: This will allow you to branch to Extra Action Points based on whether or not one or more of your PCs is suffering from a specific condition.
Options: None
E-Codes: 1) What Condition To Test
2) 0 = Check whole party, -1 = Check Picked,
1-6 Check character by position (1 = Top Character)
3) String ID to Display on Fail.
Will then Exit Without Branching to Item 5.
4) Branch to X-AP on Success
5) Branch to X-AP on Fail
 
Code 82 Turn Cleric Turning OFF.
ID None
Use: This will remove the player's ability to use the Clerical power of Turning Undead and Nether Beings. You must use Code 83 to reinstate this ability once it has been removed.
Options: None
E-Codes: None
 
Code 83 Turn Cleric Turning ON.
ID None
Use: This will allow the player to use the clerical power of Turning Undead and Nether Beings if it has been previous disabled using Code 83.
Options: None
E-Codes: None
 
Code 84 Check for Registered Scenario
ID None
Use: Whenever a code 84 is encountered a check to see if the scenario is registered is made and the game will quit if it is not. This can be used as a crude form of copy protection.
A good way to use this is to cover an entire level (Beyond the registration point) with a random rectangle, give it a 500 chance to activate or so and have it branch ot an X-AP that only has a code 84 in it. That way if somebody hacks a saved game or something along that line to let them play a scenario this will catch that and give them the big boot.
Options: None
E-Codes: None
 
Code 85 Branch on Random Event.
ID Extra Codes ID
Use: This will allow you to branch to a random Extra Action Point, Simple Encounter or Complex Encounter.
3 = In Boat, 4 = Camping, 5 = Caste Class Present, 6 = Race Class
Present, 7 = Total Party Levels, 8 = Picked Character Levels.
2) Caste, Race, Gender, Caste Class, Race Class: Code To Check For.
A Negative Value = Test Picked Only.
For Total Levels Test: Test = TRUE If Total Levels > X
3) Branch Type: 0 = X-AP, 1 = Simple, 2 = Complex
4) X-AP/Encounter No. if Test = TRUE.
5) X-AP/Encounter No. if Test = FALSE. 0 = Continue Codes
Gender Codes: 1 = Male 2 = Female
In Boat, Camping Test Test = TRUE if party is in a boat or camping.
Caste, Race, Caste Class, Race Class: See Keycodes in Menu
 
Code 87 Branch on Special Character Present
ID Extra Codes ID
Use: This will allow you to branch on whether a specific Special Character is with the party or not.
Options: None
E-Codes: 1) Monster number to check for.
2) If Present, Branch To: 0 = X-AP, 1 = Simple Encounter,
2 = Complex Encounter
3) If Not Present, 0 = Branch as in Item 2, 1 = Continue Codes
2 = Display String & Exit
4) X-AP/Encounter No. If Present.
5) X-AP/Encounter No./String ID If Not Present.
 
Code 88 Drop Special Character from Party
ID Monster Number to Drop
Use: Will allow you to remove an Special Character from the party.
Options: None
E-Codes: None
 
Code 89 Add Special Character to Party
ID Monster Number
Use: This will allow you to add a special character to the party.
Options: None
E-Codes: None
 
Code 90 Take Away Victory Points
ID Codes ID
Use: Allows you to take Victory Points away from party members.
Options: None
E-Codes: 1) How Much To Take
2) 0 = Each, 1 = Picked, 2 = Spread Around
 
Code 91 Drop All Equipment
ID None
Use: This code will strip all characters of all the equipment they have. It will even remove cursed items. All equipment is lost to the void and cannot be brought back. WOW! Your scenario won't be too popular if you use this baby.
Options: None
E-Codes: None
 
Code 92 Alter Size of Random Rectangle
ID ID of First of two consecutive Extra Codes IDs.
Use: Allows you to alter some aspects of a Random Rectangle. This is the only code that takes two extra code segments in order to perform. The extra code segment that follows the initial one must contain the information for E-Code 5 if required.
Code 23 also allows you to alter some aspects of a Random Rectangle.
Options: None
E-Codes: 1) Land/Dungeon Level Of Rectangle
2) Rectangle Number
3) 0 = On Land, 1 = In a Dungeon
4) +/- to Encounter %, Base 10,000
5) -1 = No Change, 0 = Set Coordinates, 1 = Offset Rectangle
2 = Resize, 3 = Warp
The E-Codes following the once attached to the Code 92 holds the values specified by E-Code 5 above.
E-Code 5 Special Instructions:
-1 = No Change. This will leave the actual demensions of the rectangle as they are. You do not need to script the next E-Code with any more information.
0 = Set Coordinates. If you want to change the Left, Right, Top and Bottom bounding coordinates of the rectangle you can specify the exact size. In the following E-Code:
Item 1 = Left
Item 2 = Right
Item 3 = Top
Item 4 = Bottom
1 = Offset Rectangle. If you want to keep the same size rectangle but move it to a new location, you can specify the amount to move it. In the following E-Code after the one attached to the Code:
Item 1 = Horizontal Offset. Example: -3 moves it left 3 tiles, +5 moves it right 5 tiles ect.
Item 2 = Verticle Offset. Example: -3 moves it up 3 tiles, +5 moves it down 5 tiles ect.
2 = Warp. This will let you keep the relative location of the rectangle where it is but move any particular side out or in. In the following E-Code:
Item 1 = Left Side Change. Example: +2 will move the left side 2 squares to the right.
Item 2 = Rigth Side Change. Example: +2 will move the right side 2 squares to the right.
Item 3 = Top Side Change. Example: +2 will move the top side 2 squares down.
Item 4 = Bottom Side Change. Example: +2 will move the bottom 2 squares down.
Just remember. A + value will move it right and down and a - value will move it up and left.
 
Code 93 Turn Compass On
ID None
Use: This code will turn on the compass that is displayed while the party is in a dungeon, if it has been previously disabled.
Options: None
E-Codes: None
 
Code 94 Turn Compass Off
ID None
Use: This code will turn off the compass that is displayed while the party is in a dungeon. It will not function again until it has been enabled with a CODE 93.
Options: None
E-Codes: None
 
Code 95 Change Look Direction
ID Direction to face the party. (Dungeons only)
1 = N, 2 = E, 3 = S, 4 = Wt, -1 = Random Direction.
Use: This will allow you to alter the direction the party is facing in a dungeon.
Options: None
E-Codes: None
 
Code 96 Force Party To Use 3D View In Dungeons
ID None
Use: This code will eliminate the ability for the player to view dungeons using the 2D Look Down view. It will remain this way until a CODE 97 is encountered.
Options: None
E-Codes: None
 
Code 97 Allow Use of 3D or 2D Look Down View In Dungeons
ID None
Use: This code will allow the player to use either the 3D or the 2D veiw in the dungeons.
Options: None
E-Codes: None
 
Code 98 Not Used
 
Code 99 Not Used
 
Code 100 End Battle
ID None
Use: This will end the current battle. This can be used as one option of a branch on a check if creature present, etc. As just one example, you can have a battle end after a round if creature XYZ is still alive. You can be pretty creative as to why the battle would end.
Options: None
E-Codes: None
 
Code 101 Back Up Party
ID None
Use: This will back the party up 1 square in the exact opposite direction from which they entered the current land tile. You can do this with code 61 too but this is a quick and dirty way of coding ti without having to figure out any X: Y: locations. NOTE: This can only be done with land levels. It can't be done in dungeons.
Options: None
E-Codes: None
 
Code 102 Not Used
 
Code 103 Continue/Set on Boat / Camping Status
ID Extra Codes ID
Use: This will let you continue or drop out of the current Action Point depending on whether or not the party is in a boat or camping.
Options: None
E-Codes: 1) 1 = Continue codes if in boat, 2 = Continue if NOT in boat.
2) 1 = Continue codes if camping, 2 = Continue if NOT camping.
3) 1 = Set boat status to IN BOAT,
2 = Set boat status to NOT IN BOAT.
 
Code 104 Disable Random Battles
ID 1 = Allow random battles, 0 = Disable random battles.
Use: This will let you enable/disable the chance that the party will encounter a Random Rectangle battle. This does not affect the chance that they may encounter a special random encounter, only the mundane and mindless random battles.
Options: None
E-Codes: None
 
Code 105 Not Used
 
Code 106 Set Darkland / Line of Site Status
ID Extra Codes ID
Use: This will let you change whether or not a land level is dark or uses line of site.
Options: None
E-Codes: 1) 1 = Make Current Land Level Light,
2 = Make Current Land Level Dark
2) 1 = Skip remainder of Action Point if no light change needed.
3) 1 = Current Land Level Uses Line Of Site,
2 = Current Land Level Does Not Use Line Of Site,
4) 1 = Skip remainder of Action Point if no LOS change needed.
 
Code 107 Improved Selective Battle
ID Extra Codes ID
Use: This code requires you to perform a PICK CHARACTERS of some type prior to using it. This code will instigate a battle with only those characters who have been picked. This also branches to an X-AP if the party fails to achive victory in the battle specified.
Options: None
E-Codes: 1) Battle ID -OR- Low Range of Random Battle
2) High Range of Random Battle. ---Optional---
3) Sound (Optional)
4) String ID (Optional)
5) X-AP to branch to on failure to achive victory.
 
Code 108-118 Not Used
 
Code 119 Revive NPC After Combat
ID Not Used
Use: Place a 119 code in any NPCs Monster Macro and they will get killed in combat but will always return with 1 point of stamina at the end of combat. i.e. They can never really be killed in combat and will always remain with the party until you remove them.
Options: None
E-Codes: Not Used
 
Code 120 Alter NPC • Monster During Combat
ID Extra Codes ID
Use: This will allow you to change the ICON or the TRAITOR value of a monster or NPC during combat.
Use: This will cause all lower forms of Undead (all those that are defined as UNINTELLIGENT) to be destroyed. Those that are destroyed must have the same allegiance as the creature that caused their downfall.
Options: None
E-Codes: None
Script Tip: A good use for this is to destroy all vampire rats when the main vampire is killed or some other such use.
 
Code 122 Cause Fumble (Monster Macro Only)
ID Extra Codes ID
Use: This will cause the creature that just killed this monster to fumble its weapon. i.e. If the creature turns to stone on death and traps the weapon, then this code will cause the attacker to lose that weapon till the end of the battle.
Options: None
E-Codes: 1) Message to Display on Fumble --Optional--
2) Sound -- Optional --
 
Code 123 Cause Rout (Monster & Battle Macros Only)
ID Extra Codes ID
Use: This will cause specific monsters to run away in fear. i.e. If you kill the goblin chief, you can have all goblin archers and warriors run in fear.
Use: This will cause monsters to form or spawn in place of that monster that was just killed. i.e. You could have two yellow molds form up where a green mold was just killed.
Options: None
E-Codes: 1) Type: 0 = Spawn Individual Monsters.
2) Monster ID To Spawn
3) Number To Spawn (Neg = Random 1 to X)
4) Spawn Sound
 
Code 125 Destroy Related Monsters (Monster & Battle Macros Only)
ID Extra Codes ID
Use: This will let you kill some or all monsters of a specific type upon the death of another monster. i.e. Kill the demon lord and all demi-demons will perish instantly.
Options: None
E-Codes: 1) Monster ID to Destroy.
2) Number of monsters to destroy (0 = ALL)
 
Code 126 Battle Macro Criteria (See Example Under Macro Code Menu)
ID Extra Action Point Code ID
Use: If a Battle Macro (Extra Action Point) is attached to a battle, this is often the first code scripted in the X-AP. This will test after each round of battle for specific conditions. If the conditions become TRUE, then the remainder of the X-AP is executed. In all practicality, this macro is defined just like an Extra Action Point except you have a few special codes you can use .
Options: None
E-Codes: 1) Activate on: 0 = After Round No. X,
1 = % Chance/ Per Round, 2 = Flee/Fail
2) Round No. / % Chance to Activate
3) Activate: 0 = Single Time, 1 = Check Each Round,
2 = Branch To Random Macro
4) X-AP To Activate -OR- :Random X-AP (Low Range)
5) :Random X-AP (High Range)
Note: If you want this to activate a specific Macro, place that Macro number in item 4. If you want it to be one of a random range of Macros then use item 4 as the low range and item 5 as the high range.
You can see an example of a Battle Macro in the chapter "Macros • Quests".
Use: This will allow any codes being executed in a macro to continue being executed depending on whether or not a specific monster is still present in the battle. You can have event XYZ happen every round until monster ABC is destroyed.
As an example, you could check every round to see if Lord Pusswart was still fighting against you. If so, then you could summon a minor demon to fight on his side. This would happen each round until he is dead.
Options: None
E-Codes: None
 
Code 17 Cast Spell (Target Monster)
ID Extra Codes ID
Use: This spell is defined exactly like the normal code 17. However, if this code appears in a Monster Macro, the spell will be targeted on the position of the monster that was just destroyed. i.e. You can have the Slime Spore explode into a Level 3 Acid Bath spell upon its demise or some other such evil deed.